package main;

import java.io.IOException;

import org.apache.log4j.Logger;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import fieldmaps.database.DatabaseGenericMap;
import fieldmaps.database.DatabaseVoronoiMap;
import fieldmaps.files.LoadVoronoiMapFromFile;

/**
 * Unit test for simple App.
 */
public class CreateVoronoi 
    extends TestCase
{
	private static Logger LOGGER = Logger.getLogger(CreateVoronoi.class);
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public CreateVoronoi( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( CreateVoronoi.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
    	LoadVoronoiMapFromFile mapFile = new LoadVoronoiMapFromFile();
    	try {
			DatabaseGenericMap dbMap = mapFile.createMapFromFile("../Data/voronoi_data/ejemplo", "ejemplo_voronoi");
		} catch (IOException e) {
			LOGGER.error(e.getMessage());
		}

    }
}
